<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">

<title>Timeline</title>

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="Javascript/iscroll.js"></script>
<script type="text/javascript" src="Javascript/js.js"></script>

<script type="text/javascript">
var myScroll;
var uniScroll;
function loaded () {
	myScroll = new IScroll('#wrapper', { mouseWheel: true, tap: true });
    //getSelectedEvents("","scroller");
   // uniScroll = new IScroll('#uniWrap', { mouseWheel: true, tap: true });
    var elements = document.getElementsByClassName('but');
    l=elements.length
    for(var i=0; i<l; i++){
        elements[i].addEventListener('tap', function () {
            this.style.background = !this.style.background ? '#a00' : '';
        }, false);
    }
}

/*function loaded () {
	myScroll = new IScroll('#wrapper', { mouseWheel: true, tap: true });
    
	var elements = document.getElementsByClass('uniButton');
    for(var i=0, l=elements.length; i<l; i++){
        elements[i].addEventListener('tap', function () {
                                     /*this.style.background = !this.style.background ? '#a00' : '';
                                     alert("hello");
                                     }, false);
    }
}*/
/*function loaded () {
	myScroll = new IScroll('#wrapper', { mouseWheel: true, tap: true });
    uniScroll = new IScroll('#uniWrap', { mouseWheel: true, tap: true });
    var elements = document.getElementsByClassName('uniButton');
    for(var i=0, l=elements.length; i<l; i++){
        elements[i].addEventListener('tap', function () {
                                     
                                     alert("hello");
                                     }, false);
    }*/

document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
</script>

<style type="text/css">
    * {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

html {
	-ms-touch-action: none;
}

body,ul,li {
	padding: 0;
	margin: 0;
	border: 0;
}

body {
	font-size: 12px;
	font-family: ubuntu, helvetica, arial;
	overflow: hidden;
}

#header {
	position: absolute;
	z-index: 2;
	top: 0;
	left: 0;
	width: 100%;
	height: 45px;
	line-height: 45px;
	background: #CD235C;
	padding: 0;
	color: #eee;
	font-size: 20px;
	text-align: center;
	font-weight: bold;
}

#footer {
	position: absolute;
	z-index: 2;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 10%;
	background: #444;
	padding: 0;
	border-top: 1px solid #444;
}

#wrapper {
	position: absolute;
	z-index: 1;
	top: 45px;
	bottom: 10%;
	left: 10%;
	width: 90%;
	background: #ccc;
	overflow: hidden;
}
/*
#uniWrap {
	position: absolute;
	z-index: 3;
	top: 0px;
	bottom: 10%;
	width:10%;
	background: #ccc;
	overflow: hidden;
}*/

#scroller {
	position: absolute;
	z-index: 1;
	-webkit-tap-highlight-color: rgba(0,0,0,0);
	width: 100%;
	-webkit-transform: translateZ(0);
	-moz-transform: translateZ(0);
	-ms-transform: translateZ(0);
	-o-transform: translateZ(0);
	transform: translateZ(0);
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-text-size-adjust: none;
	-moz-text-size-adjust: none;
	-ms-text-size-adjust: none;
	-o-text-size-adjust: none;
	text-size-adjust: none;
}

#scroller ul {
	list-style: none;
	padding: 0;
	margin: 0;
	width: 100%;
	text-align: left;
}

#scroller li {
	padding: 0 10px;
	/*height: 40px;*/
	/*line-height: 40px;*/
	border-bottom: 1px solid #ccc;
	border-top: 1px solid #fff;
	background-color: #fafafa;
	font-size: 14px;
}
/*
#uniScrol unil {
	list-style: none;
	padding: 0;
	margin: 0;
	width: 100%;
	text-align: left;
}
#uniScrol unili {
	padding: 0 10px;
	height: 40px;
	line-height: 40px;
	border-bottom: 1px solid #ccc;
	border-top: 1px solid #fff;
	background-color: #fafafa;
	font-size: 14px;
}
*/
.uniButton {
    position: absolute;
    z-index: 2;
    width: 10%;
    height: 18%;
    left: 0;
    top: 0;
    font-family:'Times New Roman';
    text-align: middle;
    vertical-align:middle;
    color: rgb(0, 0, 0);
    border-image-source: none;
    border-color: rgb(129, 255, 93);
    background-image: none;
    background-color: rgb(124, 230, 0);
}
.fhButton {
    position: absolute;
    z-index: 2;
    width: 10%;
    height: 18%;
    left: 0;
    top: 18%;
    font-family:'Times New Roman';
    text-align: middle;
    vertical-align:middle;
    color: rgb(0, 0, 0);
    border-image-source: none;
    border-color: rgb(129, 255, 93);
    background-image: none;
    background-color: rgb(120, 120, 120);
}
.inselButton {
    position: absolute;
    z-index: 2;
    width: 10%;
    height: 18%;
    left: 0;
    top: 36%;
    font-family:'Times New Roman';
    text-align: middle;
    vertical-align:middle;
    color: rgb(0, 0, 0);
    border-image-source: none;
    border-color: rgb(129, 255, 93);
    background-image: none;
    background-color: rgb(240, 10, 10);
}
.kultButton {
    position: absolute;
    z-index: 2;
    width: 10%;
    height: 18%;
    left: 0;
    top: 54%;
    font-family:'Times New Roman';
    text-align: middle;
    vertical-align:middle;
    color: rgb(0, 0, 0);
    border-image-source: none;
    border-color: rgb(129, 255, 93);
    background-image: none;
    background-color: rgb(240, 240, 10);
}
.alleButton {
    position: absolute;
    z-index: 2;
    width: 10%;
    height: 18%;
    left: 0;
    top: 72%;
    font-family:'Times New Roman';
    text-align: middle;
    vertical-align:middle;
    color: rgb(0, 0, 0);
    border-image-source: none;
    border-color: rgb(129, 255, 93);
    background-image: none;
    background-color: rgb(240, 240, 240);
}



    </style>
</head>
<body onload="loaded()">
    <div id="header">Alle Veranstaltungen</div>
    <div id="wrapper">
        <div id="scroller">
            <ul>
                <script>
                    
                    getSelectedEvents("","scroller");
                    </script>
                <div></div>
            </ul>
        </div>
    </div>
 <!--   <div id="uniWrap">
        <div id="uniScrol">
            <unil>
                <unili id = "uniW" onclick='getSelectedEvents("Universität Konstanz","scroller");'>testtestestestestestestest</unili>
            </unil>
        </div>
    </div>-->
    <div class="uniButton"  onclick='getSelectedEvents("Universität Konstanz","scroller");'>Uni</div>
    <div class="fhButton" onclick='getSelectedEvents("HTWG Konstanz","scroller");'>HTWG</div>
    <div class="inselButton" onclick='getSelectedEvents("Insel Mainau","scroller");'>Mainau</div>
    <div class="kultButton" onclick='getSelectedEvents("Kulturzentrum am Münster (Stadt und PHTG)","scroller");'>PHTG</div>
    <div class="alleButton" onclick='getSelectedEvents("","scroller");'>Alle</div>
    <div id="footer"></div>
</body>
</html>